<template>
  <view class="fullscreen-video">
    <video id="myVideo" :src="url" controls object-fit="cover"> controls</video>
  </view>
</template>

<script>
import { operationVideo } from "@/api/index";

export default {
  data() {
    return {
      url: "",
    };
  },
  onLoad() {
    operationVideo()
      .then((res) => {
        if (res.code === 0) {
          this.url = res.data.url;
        }
      })
      .catch((err) => {
        console.log(err);
      });
  },
  methods: {},
};
</script>

<style>
.fullscreen-video {
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

video {
  width: 100%;
  height: 100%;
}
</style>
